const express = require('express');
const router = express.Router();
const userinfoHandler = require('../router_handler/userinfo');
// 导入验证数据合法性的中间件
const expressJoi = require('@escook/express-joi')

const { update_userinfo_schema, update_password_schema } = require('../schema/users')
router.get('/userinfo', userinfoHandler.getUserInfo)
router.post('/userinfo', userinfoHandler.updateUserinfo);
router.post('/updatepwd', userinfoHandler.updatePwd)
    // 更新用户头像的路由
router.post('/update/avatar', userinfoHandler.updateAvatar)

module.exports = router